import routerGlobal from './routerGlobal.js'
import AppMain from '../layout/Index.vue'
import bsRoutes from './baseSettings'

const routerList = [
  {
    path: '/',
    name: 'home',
    component: AppMain,
    redirect: '/role-manage',
    meta: {
      title: '角色管理'
    },
    children: [
      {
        path: '/role-manage',
        name: 'roleManage',
        meta: {
          title: '角色管理',
          affix: true,
          bread: ['基础设置', '角色管理']
        },
        component: () => import('../pages/basicData/roleManage/index.vue')
      },
      ...bsRoutes
    ]
  },
  // 全局路由
  ...routerGlobal,
  {
    path: '/notfound',
    name: '404',
    meta: {
      title: '404'
    },
    component: () => import('../whiteListPage/NotFound.vue')
  },
  {
    path: '/*',
    meta: {
      title: '404'
    },
    redirect: '/notfound'
  }
]

export default routerList
